<?php
// App::import('Html',"html");
// App::import('Form',"form");
// App::import('Session',"session");


	class AppController extends Controller
	{
		var $components = array('Auth', 'Session');
	
		function beforeFilter() {
			$this->Auth->allow('login');
			$this->Auth->userModel = 'Staff';
			$this->layout = 'main_page';
			
			$this->set("staffs_username",$this->StaffsUsername());
			$this->set("staffs_staffid",$this->Staffs_Id());
		}
		
		function StaffsUsername(){
			$staffs_username = NULL;
			if($this->Auth->user())
			$staffs_username = $this->Auth->user("username");
			return $staffs_username;
		}
		
		function Staffs_Id(){
			$staffs_id = NULL;
			if($this->Auth->user())
			$staffs_id = $this->Auth->user("staff_id");
			return $staffs_id;
		}
	};
?>